<template>
  <div id="searchList">
     <headers></headers>
     <div class="searchContent">
        <div class="index-title">
            <span>情报跟踪</span>
        </div>
        <!-- 搜索框 -->
        <div class="search">
            <input type="text" class="search-input" name="search" v-model="searchVal" placeholder="请输入你想知道的"/>
            <input type="button" class="search-button" value="搜索"/>
            <i class="search-icon"></i>
        </div>
        <div class="routerContent">
            <div class="routerTab">
                <ul>
                    <li>
                        <router-link to="/searchList/comprehensive">综合</router-link>
                    </li>
                    <li>
                        <router-link to="/searchList/dynamicData">动态数据</router-link>
                    </li>
                    <li>
                        <router-link to="/searchList/science">科技文献</router-link>
                    </li>
                    <li>
                        <router-link to="/searchList/patentData">专利数据</router-link>
                    </li>
                    <li>
                        <router-link to="/searchList/resultBase">成果库</router-link>
                    </li>
                    <li>
                        <router-link to="/searchList/books">图书</router-link>
                    </li>
                </ul>
            </div>  
            <div>
                <router-view></router-view>
            </div>
        </div>
     </div>

  </div>
</template>

<script>
import Header from '@/components/header'

export default {
  data () {
    return {
      searchVal: ''
    }
  },
  mounted: function () {
    this.searchVal = this.$route.query.searchVal
    this.searchValInit()
  },
  methods: {
    searchValInit: function () {
      this.$http.post('http://192.168.31.217:8080/article/search',{
        queryString: this.searchVal,
        indexName: '',
        ordernum: '',
        orderrule: '',
        pageNum: '',
        pageSize: ''
      }).then (function (response) {
        console.log(response)
      })
    }
  },
  components: {
    'headers': Header
  }
}
</script>

<style>
    @import '../../../static/searchList/searchList.css'
</style>
